﻿#ifndef CAUDIOBROADCAST_H_
#define CAUDIOBROADCAST_H_

#include <iostream>

class QMediaPlayer;
class QMediaPlaylist;

namespace zl {

class CAudioBroadcast
{
public:
	static CAudioBroadcast* Instance();
	static void Release();

	int32_t Init();
	int32_t UnInit();
    int32_t Play(int index);
    int32_t Play(const std::string& name);
	int32_t Stop();
	int32_t LoadMediaResource(const std::string& path);
	int32_t ClearMediaResource();

protected:
	CAudioBroadcast();
	~CAudioBroadcast();

private:
	static CAudioBroadcast*		Instance_;

	QMediaPlayer*		player_;
	QMediaPlaylist*		play_list_;
};

}

#endif // CAUDIOBROADCAST_H_
